package sdufe.lele.service;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import sdufe.lele.dao.AccountTypeMapper;
import sdufe.lele.dao.MessageMapper;
import javax.annotation.Resource;

/**
 * Created by Olivia
 * 1
 * on 4/15/2017.
 */

@Repository
public class UpdateTypeService {
    @Resource
    private AccountTypeMapper accountTypeMapper;

    @Resource
    private MessageMapper messageMapper;


    @Transactional
    public void updateAll(String oldName,String newName){
        accountTypeMapper.updateName(oldName, newName);
        messageMapper.updatealltype(oldName, newName);

    }

}
